You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

@babel/plugin-syntax-function-sent

Package Overview
Dependencies
Maintainers
4
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/plugin-syntax-function-sent

Allow parsing of the function.sent meta property


Version published
Weekly downloads
241K
decreased by-1.62%
Maintainers
4
Install size
192 kB
Created
Weekly downloads
 

Package description

What is @babel/plugin-syntax-function-sent?

@babel/plugin-syntax-function-sent is a Babel plugin that allows parsing of the `function.sent` meta-property in generator functions. This meta-property is used to access the value sent to the generator by the `next` method.

What are @babel/plugin-syntax-function-sent's main functionalities?

Parsing function.sent

This feature allows the generator function to access the value sent to it via the `next` method using the `function.sent` meta-property. This can be useful for handling values passed into the generator at different stages of its execution.

function* generator() {
  console.log(function.sent);
  yield;
}
const gen = generator();
gen.next('first'); // Logs: 'first'
gen.next('second'); // Logs: 'second'

Other packages similar to @babel/plugin-syntax-function-sent

Readme

Source

@babel/plugin-syntax-function-sent

Allow parsing of the function.sent meta property

See our website @babel/plugin-syntax-function-sent for more information.

Install

Using npm:

npm install --save-dev @babel/plugin-syntax-function-sent

or using yarn:

yarn add @babel/plugin-syntax-function-sent --dev

Keywords

FAQs

Package last updated on 05 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc